SaveDialog
File$ = SaveDialog(Title$, Filename$, Filter$)
 
Parameters:

    Title$ = Title of dialog
    Filename$ = Set the name of fileOf File
    Filter$ = File Type Filter
Returns:

    File$= The full path & filename of the selected file. If no file was selected, it'll return a NULL string
 

     SaveDialog opens a windows save file dialog.




FACTS:


      * The SaveDialog function returns a NULL string if no file was selected or the user selects cancel.

      * SaveDialog is not asynchronous, so the PlayBasic application will halt while the dialog is open.




 
Example Source: Download This Example
; Inlcude the Dialogs library in this program
  #Include "PBDialogs"
  
  
; Title Of the Dialog
  Title$="Save A Text File"
  
; Pre-seed the file name we're expecting to find
  Filename$="Some Cool FIle.txt"
  
  
;   Filter$="" ; No Filter show all files
  Filter$     ="(*.TXT)|*.TXT"          ; Only TXT files
;     Filter$     ="(*.PNG)|*.PNG"          ; Only PNG files
;     Filter$     ="(*.BMP)|*.BMP"          ; Only BMP Files
;     Filter$     ="(*.Jpeg)|*.JPG"          ; Only JPG files
;     Filter$ ="(*.Images)|*.JPG;*.bmp;*.PNG;*gif"   ; Mixture of image files
  
  
; Call the Save Dialog
  File$=SaveDialog(Title$,Filename$,Filter$)
  
  
; Display the Info about this file$
  If FIle$=""
     Print "You Selected To: Cancel Save"
     
  Else
     
     If FileExist(file$)
        Print "You Selected To: Save Over Existing File"
     Else
        Print "You Selected To: Save A New File"
     EndIf
     
  EndIf
  
  // Display the screen & wait for a key press to end
  Sync
  WaitKey
  
  
  
 
Related Info: LoadDialog :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com